package main

import (
	"flag"
	"fmt"
	_ "goods/initialization"
	"google.golang.org/grpc"
	"log"
	"net"
)

var (
	port = flag.Int("goods", 50051, "The server port")
)

func main() {
	flag.Parse()
	lis, _ := net.Listen("tcp", fmt.Sprintf(":%v", *port))
	s := grpc.NewServer()
	log.Printf("server listening at %v", lis.Addr())
	if err := s.Serve(lis); err != nil {
		log.Printf("server listening at %v", lis.Addr())
	}
}
